package com.example.lixin.planeview;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.view.View;

/**
 * Created by Administrator on 2015/7/23 0023.
 */
public class PlaneView extends View {
    public float currentX;
    public  float currentY;

    Bitmap plane;


    public PlaneView(Context context) {
        super(context);

        plane = BitmapFactory.decodeResource(context.getResources(), R.drawable.plane);
        setFocusable(true);
    }
    public void onDraw(Canvas canvas){
        super.onDraw(canvas);

        Paint P=new Paint();
        canvas.drawBitmap(plane,currentX,currentY,P);
    }
}
